﻿@model List<StudentCoursewarePeriodView>
@{
    ViewBag.Title = "我的课程";
    Student currentStudent = EduWebHelper.GetStudentSession().Student;
    PeriodDetails lastPeriodDetails = ViewBag.lastPeriodDetails;
    string lastLearning = string.Empty;
    if (lastPeriodDetails!=null)
    {
        lastLearning = DateTimeHelper.FormatDateHasSecond(lastPeriodDetails.CreateDateTime);
    }
    string learnPeriodString = "0";
    if (ViewBag.learnPeriod > 0)
    {
        learnPeriodString = DateTimeHelper.GetTimeStringHMS(ViewBag.learnPeriod);
    }
    string dayPeriodString = "0";
    if (ViewBag.dayPeriod > 0)
    {
        dayPeriodString = DateTimeHelper.GetTimeStringHMS(ViewBag.dayPeriod);
    }

}
<div class="bbox1">
    <div class="student_topnav">
        <div class="titleH1">
            <div class="h1-title">@ViewBag.Title - @currentStudent.WorkCategoryName</div>
        </div>
    </div>

    <div style="margin: 15px;">
        <div class="resumelist" style="margin-bottom: 5px">

            <div class="relist">

                <div class="toptitle">
                    <div class="t">
                        <span class="h2-title">姓名:@currentStudent.Name</span>
                        <span class="date">培训总学时： @DateTimeHelper.GetTimeStringHMS(ViewBag.totalPeriod)</span>
                        <span class="date">已完成总学时：@learnPeriodString</span>
                        <span class="date">今天完成学时：@dayPeriodString</span>
                        <span class="date">
                        @if (!string.IsNullOrEmpty(lastLearning))
                        {
                            <span>上次学习时间：</span>@lastLearning
                        } 
                        </span>
                    </div>
                </div>
                <div class="fbox" style="padding-bottom: 20px;">
                    身份证号码：@currentStudent.IDCardNo <br>
                    工作单位：@currentStudent.CompanyName <br>
                    联系电话：@currentStudent.MobilePhone <br>
                    从业类别：@currentStudent.WorkCategoryName <br>
                    培训学校：@currentStudent.SchoolName
                </div>
                <div class="fbox">
                    住 址：@currentStudent.Address <br>
                    从业资格证号：@currentStudent.Certificate <br>
                    初领证日期：@DateTimeHelper.FormatDate(currentStudent.StartDate) <br>
                    证件有效期：@DateTimeHelper.FormatDate(currentStudent.EndDate)<br>
                    状态：<label class="primary-label">@currentStudent.StatusName</label>
                </div>
                <div class="clear"></div>

            </div>

        </div>

        <table class="table table-bordered table-hover table-manage">
            <thead>
                <tr>
                    <th>课件名称</th>
                    <th>课件学时</th>
                    <th>已获学时</th>
                    <th class="w80px text-center">操作</th>
                </tr>
            </thead>
            <tbody>
                @foreach (var record in Model)
                {
                    <tr>
                        <td>@record.CoursewareName</td>
                        <td>@record.CoursewarePeriodName</td>
                        <td>@record.LearnPeriodName</td>
                        <td class="text-center">
                            <a class="btn btn-primary btn-sm" href="@Url.Action("Learning", new {coursewareId = record.CoursewareId})">开始学习</a>
                        </td>
                    </tr>
                }
            </tbody>
        </table>

        <div class="row">
            <div class="bottomtip">
                <div class="tp h2-title">温馨提示</div>
                <p>1、学习开始时，系统会弹出验证窗口；验证通过后，系统开始记录学时；中间会依据时间设定，随机弹出验证窗口，未通过或等待验证超时，系统将不记录学时；学员想中断培训时，点击界面上侧签退按钮，通过验证后系统会记录学时。</p>
                <p>2、每个课件系统设置规定学时，但学员培训学时达到规定学时后，系统将不在计时，学员可通过课程列表更换其他课件继续学习。</p>
            </div>
        </div>
    </div>
</div>